package com.whnk.web.controller.report;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.whnk.report.domain.Work;

@Controller
@RequestMapping(value="/report/work")
public class WorkController {

	@RequestMapping(value="/workCount")
    @ResponseBody
    public String workCount(HttpServletRequest request, HttpServletResponse response) {
        List<Work> list = new ArrayList<Work>();
        list.add(new Work("35", "25"));
        list.add(new Work("10", "30"));
        list.add(new Work("33", "63"));
        list.add(new Work("88", "28"));
        list.add(new Work("12", "62"));
        list.add(new Work("22", "35"));
        String data = JSON.toJSON(list).toString();
        return data;
    }
}
